import axios from 'axios';
/**
 * 获取包列表信息
 */
export async function getResPackages() {
    try {
        const response = await axios.get('https://mc.wyouw.cn/BlocksParty/resPackages.json', {
            headers: {
                'Cache-Control': 'no-cache'
            }
        });
        if (response.status === 200) {
            return response.data;
        }
        return false;
    } catch (error) {
        return false;
    }
}

/**
 * 获取软件版本
 * @returns 
 */
export async function getAppv() {
    try {
        const response = await axios.get('https://mc.wyouw.cn/BlocksParty/appv.json',{
            headers: {
                'Cache-Control': 'no-cache'
            }
        });
        if (response.status === 200) {
            return response.data;
        }
        return false;
    } catch (error) {
        return false;
    }
}


/**
 * 获取控制台编辑框提示配置
 * @returns 
 */
export async function getHintCmd() {
    try {
        const response = await axios.get('https://mc.wyouw.cn/BlocksParty/editBoxPrompt.json',{
            headers: {
                'Cache-Control': 'no-cache'
            }
        });
        if (response.status === 200) {
            return response.data;
        }
        return false;
    } catch (error) {
        return false;
    }
}